package com.niit.mall.api.client;


import com.niit.mall.api.fallback.CartClientFallbackFactory;
import com.niit.mall.common.api.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @BelongsProject: pardo_mall_backend
 * @BelongsPackage: com.niit.mall.api.client
 * @Author: ChuXuan
 * @CreateTime: 2025-06-08  03:10
 * @Description: 购物车模块的FeignClient
 * @Version: 1.0
 */
@FeignClient(value = "cart-service", fallbackFactory = CartClientFallbackFactory.class)
public interface CartClient {

    @PutMapping("/cart/reduce")
    CommonResult<Void> reduceStock( @RequestBody  Map<Long, Integer> productIdToQuantityMap);
}
